<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>投票选择</title>
    <style>
        body {
            font-family: 'Helvetica Neue', Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            color: #333;
            line-height: 1.6;
        }
        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 30px;
            font-weight: 300;
        }
        ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        li {
            margin-bottom: 15px;
            padding: 15px;
            background-color: #f8f9fa;
            border-radius: 4px;
            transition: all 0.3s ease;
        }
        li:hover {
            background-color: #e9ecef;
            transform: translateX(5px);
        }
        a {
            text-decoration: none;
            color: #3498db;
            display: block;
            font-size: 18px;
        }
        a:hover {
            color: #2980b9;
        }
        .no-polls {
            text-align: center;
            color: #7f8c8d;
            font-style: italic;
        }
        footer {
            text-align: center;
            margin-top: 40px;
            color: #7f8c8d;
        }
        footer a {
            display: inline;
            font-size: inherit;
        }
    </style>
</head>
<body>
    <h1>请选择你要投票的选项</h1>
    {% if latest_question_list %}
        <ul>
        {% for question in latest_question_list %}
            <li><a href="{% url 'polls:detail' question.id %}">{{ question.question_text }}</a></li>
        {% endfor %}
        </ul>
    {% else %}
        <p class="no-polls">No polls are available.</p>
    {% endif %}
    <footer>
        <p>&copy; 2025 投票应用 | 简约设计 | <a href="/admin">管理</a></p>
    </footer>
</body>
</html>